package com.hongxia.assetsys.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName tb_task_scan
 */
@TableName(value ="tb_task_scan")
@Data
public class TaskScan implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 
     */
    private String scanname;

    /**
     * 
     */
    private String tester;

    /**
     * 我的任务id
     */
    private Integer mytaskId;

    /**
     * 
     */
    private String scantarget;

    /**
     * 
     */
    private String scanpolicy;

    /**
     * 
     */
    private Date scantime;

    /**
     * 
     */
    private String foundvul;

    /**
     * 漏洞id,例如 CVE-2022-0626
     */
    private String vulno;

    /**
     * 
     */
    private String scantools;

    /**
     * 危险等级：高危，中危等
     */
    private String risklevel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TaskScan other = (TaskScan) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getScanname() == null ? other.getScanname() == null : this.getScanname().equals(other.getScanname()))
            && (this.getTester() == null ? other.getTester() == null : this.getTester().equals(other.getTester()))
            && (this.getMytaskId() == null ? other.getMytaskId() == null : this.getMytaskId().equals(other.getMytaskId()))
            && (this.getScantarget() == null ? other.getScantarget() == null : this.getScantarget().equals(other.getScantarget()))
            && (this.getScanpolicy() == null ? other.getScanpolicy() == null : this.getScanpolicy().equals(other.getScanpolicy()))
            && (this.getScantime() == null ? other.getScantime() == null : this.getScantime().equals(other.getScantime()))
            && (this.getFoundvul() == null ? other.getFoundvul() == null : this.getFoundvul().equals(other.getFoundvul()))
            && (this.getVulno() == null ? other.getVulno() == null : this.getVulno().equals(other.getVulno()))
            && (this.getScantools() == null ? other.getScantools() == null : this.getScantools().equals(other.getScantools()))
            && (this.getRisklevel() == null ? other.getRisklevel() == null : this.getRisklevel().equals(other.getRisklevel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getScanname() == null) ? 0 : getScanname().hashCode());
        result = prime * result + ((getTester() == null) ? 0 : getTester().hashCode());
        result = prime * result + ((getMytaskId() == null) ? 0 : getMytaskId().hashCode());
        result = prime * result + ((getScantarget() == null) ? 0 : getScantarget().hashCode());
        result = prime * result + ((getScanpolicy() == null) ? 0 : getScanpolicy().hashCode());
        result = prime * result + ((getScantime() == null) ? 0 : getScantime().hashCode());
        result = prime * result + ((getFoundvul() == null) ? 0 : getFoundvul().hashCode());
        result = prime * result + ((getVulno() == null) ? 0 : getVulno().hashCode());
        result = prime * result + ((getScantools() == null) ? 0 : getScantools().hashCode());
        result = prime * result + ((getRisklevel() == null) ? 0 : getRisklevel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", scanname=").append(scanname);
        sb.append(", tester=").append(tester);
        sb.append(", mytaskId=").append(mytaskId);
        sb.append(", scantarget=").append(scantarget);
        sb.append(", scanpolicy=").append(scanpolicy);
        sb.append(", scantime=").append(scantime);
        sb.append(", foundvul=").append(foundvul);
        sb.append(", vulno=").append(vulno);
        sb.append(", scantools=").append(scantools);
        sb.append(", risklevel=").append(risklevel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}